#ifndef _TALKTOFATHER_H_
#define _TALKTOFATHER_H_

#include <stdint.h>
#include <string>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <cstring>

namespace lvpublisher
{

class TalkToFather
{

public:
    static TalkToFather & getInstance();
    
    void init(uint16_t port, const std::string & ip = "127.0.0.1");
    void wantStop(const std::string & SN_ID);
    void changeState(const std::string & state);


private:
    TalkToFather();
    ~TalkToFather();

private:
    sockaddr_in     m_addr;
    int             m_fd            = -1;

};

}



#endif